<%--
  Created by IntelliJ IDEA.
  User: a
  Date: 2022/4/17
  Time: 22:51
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
    <link href="http://cdn.static.runoob.com/libs/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">

</head>
<body>
<div class="container">
    <div class="row ui-helper-clearfix">
        <div class="col-md-12 column">
            <div class="page-header">
                <h1>
                    <small>更新学生</small>
                </h1>
            </div>
        </div>
    </div>
    <form action="${pageContext.request.contextPath}/student/updateStudent" method="post">
        <%--        出现的问题：我们提交了修改的sql请求，但是修改失败，初次考虑是事务问题，配置完毕事务依旧失败
                    看一下sql语句，能否执行成功：sql执行失败，修改未完成
                        前端传递隐藏域--%>
        <input type="hidden" name="sid" value="${QStudent.sid}">
            <div class="form-group">
                <label>中文名称:</label>
                <%--            input里面的name属性必须跟实体类保持一致--%>
                <input type="text" name="name" class="form-control" value="${QStudent.name}" required>
            </div>
            <div class="form-group">
                <label>英文名称:</label>
                <input type="text" name="english_name" class="form-control" value="${QStudent.english_name}" required>
            </div>
            <div class="form-group">
                <label>家庭地址：</label>
                <input type="text" name="address" class="form-control" value="${QStudent.address}" required>
            </div>
            <div class="form-group">
                <label>手机号码：</label>
                <input type="text" name="phone_number" class="form-control" value="${QStudent.phone_number}" required>
            </div>
            <div class="form-group">
                <label>出生日期：</label>
                <input type="text" name="birthday" class="form-control" value="${QStudent.birthday}" required>
            </div>
            <div class="form-group">
                <input type="submit" class="form-control" value="更新">
            </div>

    </form>
</div>
</body>
</html>
